package com.ujs.shc.dao;

import com.ujs.shc.pojo.Focus;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface FocusMapper {

    /**
     * 通过用户id 和 商品id 查询关注对象
     * @param goodsId
     * @param userId
     * @return
     */
    public Focus selectFocusByGidAndUid(@Param("goodsId") Integer goodsId,@Param("userId") Integer userId);

    /**
     * 通过用户id 和 商品id 插入关注
     * @param goodsId
     * @param userId
     * @return
     */
    public Integer insertFocus(@Param("goodsId") Integer goodsId,@Param("userId") Integer userId);

    /**
     * 通过用户id 和 商品id 删除关注
     * @param goodsId
     * @param userId
     * @return
     */
    public Integer deleteFocus(@Param("goodsId") Integer goodsId,@Param("userId") Integer userId);


}
